/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.qx.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.qx.entity.QxMatch;
import com.thinkgem.jeesite.modules.qx.dao.QxMatchDao;

/**
 * 单表生成Service
 * @author zequs
 * @version 2017-08-23
 */
@Service
@Transactional(readOnly = true)
public class QxMatchService extends CrudService<QxMatchDao, QxMatch> {

	public QxMatch get(String id) {
		return super.get(id);
	}
	
	public List<QxMatch> findList(QxMatch qxMatch) {
		return super.findList(qxMatch);
	}
	
	public Page<QxMatch> findPage(Page<QxMatch> page, QxMatch qxMatch) {
		return super.findPage(page, qxMatch);
	}
	
	@Transactional(readOnly = false)
	public void save(QxMatch qxMatch) {
		super.save(qxMatch);
	}
	
	@Transactional(readOnly = false)
	public void delete(QxMatch qxMatch) {
		super.delete(qxMatch);
	}
	
	/**
	 * 查找某球队的最近6次比赛
	 * @param qxMatch
	 * @return
	 */
	public List<QxMatch> lastSixMatch(QxMatch qxMatch) {
		return dao.lastSixMatch(qxMatch);
	}
	
}